package com.hctforgreen.greenservice.model;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * 信息反馈 回复
 * 
 * @author dhbing
 * 
 */
public class FeedBackMessageEntity extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public String messageType = "";// 0:系统回复 1：追加反馈
	public String messageContent = "";// 回复内容
	public String messageDate = "";// 回复时间
	public String messagePicPath = "";// 图片路径

	public static FeedBackMessageEntity parse(JSONObject jsonObject)
			throws JSONException {
		FeedBackMessageEntity messageEntity = new FeedBackMessageEntity();
		if (jsonObject == null) {
			return messageEntity;
		}
		if (jsonObject.has("messageType")) {
			messageEntity.messageType = jsonObject.getString("messageType");
		}
		if (jsonObject.has("messageContent")) {
			messageEntity.messageContent = jsonObject
					.getString("messageContent");
		}
		if (jsonObject.has("messageDate")) {
			messageEntity.messageDate = jsonObject.getString("messageDate");
		}
		if (jsonObject.has("messagePicPath")) {
			messageEntity.messagePicPath = jsonObject
					.getString("messagePicPath");
		}
		return messageEntity;

	}

}
